1. Field of the Invention
The present invention relates to a semiconductor device, a driving method of the semiconductor device, and the like. In particular, the present invention relates to a semiconductor device having a function of detecting timing errors of a circuit, a driving method of the semiconductor device, and the like.
Note that in this specification, a semiconductor device means a circuit including a semiconductor element (e.g., a transistor or a diode) and a device including the circuit. The semiconductor device also means any device that can function by utilizing semiconductor characteristics. For example, an integrated circuit, a chip having an integrated circuit, a display device, a light-emitting device, a lighting device, and an electronic device are all semiconductor devices.
2. Description of the Related Art
A flip-flop (abbreviated as FF) is a kind of logic circuit, which is a memory circuit that stores one-bit data as “0” or “1”. An FF is a component circuit composing a register of a processor such as a central processing unit (CPU) and a microprocessor unit (MPU). Thus, when timing errors occur in an FF, problems such as a change of results of arithmetic operation by a processor and an increase in power consumption, which might cause malfunction of the processor.
A timing error in an FF is a phenomenon in which the timing of inputting a clock signal or a data signal is off and consequently incorrect values are read and written. In general, timing errors can be detected and removed by simulation in the design phase. However, miniaturization of processors causes an increase of the influence by dynamic factors such as heat and manufacturing variation and consequently it is difficult to remove all timing errors in the design phase.
In view of the above, a circuit to detect timing errors when an FF is operated and correct the errors has been developed; there are a canary FF (Non-Patent Document 1), a razor FF (Non-Patent Document 2), and the like.